home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 66
/
Vol 66.iso
/
games
/
doodle_d.swf
/
scripts
/
frame_4
/
DoAction_7.as
< prev
next >
Wrap
Text File
|
2013-04-24
|
943b
|
54 lines
function move()
{
ox = ship._x;
oy = ship._y;
if(ship._x > 0 && ship._x < 640 && ship._y > 0 && ship._y < 880)
{
ship._x += dx;
ship._y += dy;
}
else if(dx != 0 && dy != 0)
{
control = false;
controlTimer = 0;
dx *= -1;
dy *= -1;
if(ship._x < 0 || ship._x > 640)
{
if(ship._x < 0)
{
ship._x += 1;
}
else
{
ship._x -= 1;
}
ship._x += dx;
}
else
{
if(ship._y < 0)
{
ship._y += 1;
}
else
{
ship._y -= 1;
}
ship._y += dy;
}
ship._x += dx * 2;
ship._y += dy * 2;
}
controlTimer++;
if(controlTimer <= 6)
{
dir -= 30;
}
if(controlTimer == 6)
{
speed /= 4;
control = true;
}
}